import { createRouter, createWebHistory } from 'vue-router'
import staticRoutes from './static-routes'

// 确保 base 路径与 vite.config.ts 中的 base 一致
const BASE_PATH = '/registration_admin/'

const router = createRouter({
  routes: [
    ...staticRoutes,
  ],
  history: createWebHistory(import.meta.env.VITE_APP_BASE || BASE_PATH),
})

export default router
